<%@page import="com.jfinal.kit.PropKit"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	String res_url = PropKit.get("root_url");
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>  
<html>
<head>
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<!-- 新 Bootstrap 核心 CSS 文件 -->
		<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css">

		<!-- 可选的Bootstrap主题文件（一般不用引入） -->
		<link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">

		<!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->
		<script src="//cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>

		<!-- 最新的 Bootstrap 核心 JavaScript 文件 -->
		<script src="//cdn.bootcss.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
		<link href="/wx/css/ddSecond.css" type="text/css" rel="stylesheet"/>
		<title>用户反馈</title>
		<script>
			function show2() {
				var content=$("#content").val();
				var tel=$("#tel").val();
				if(content==''){
					alert("请填写意见！");
					return false;
				}else{
				$.ajax({
					type : "POST",
					url : "<%=res_url %>/person/feedback",
					dataType : "json",
					data : {
						content:content,
						tel:tel
					},
					success : function(data) {
						if(data!=null){
							var code = data["code"];
							
							if(code=="0"){
								alert("感谢您的配合!易行丁丁竭诚为您服务");
								$("#content").val('');
								$("#tel").val('');
							}else if(code="1"){
								alert("感谢您的配合!易行丁丁竭诚为您服务");
								location.href='<%=res_url %>'+data["res"];
							}else if(code="-1"){
								alert("验证码错误！");
							}
						}
					},
					error : function(data) {
						alert("录制信息失败！");
					}
				});
				}
			}
		</script>
	</head>
		<style>
		body{
		    font-size: 12px;
		    line-height: 22px;
		}
		textarea{
			width:82%;
			height: 180px;
			top:70px;
			position: absolute;
			left:10% ;
			background: none;
			border: none;
		}
		.submit{
			top: 380px;
			position: absolute;
		    width: 90%;
		    left:5%;
		    font-size: medium;
		    height: 37px;
		    border: 1px solid #eee;
		    background: -webkit-linear-gradient(top, #25bcf6, #155891);
		    background: -o-linear-gradient(top, #fff, #0000ff);
		    border-radius: 7px;
		    color: #fff;
		}
		.top{
			width:90%;
			height: 200px;
			top:60px;
			position: absolute;
			left:5%;
			background: #fff;
			opacity: 1;
			border-radius: 10px;
			border: 1px solid black;
		}
		.mes{
			position: absolute;
			top:30px;
			left:8%
		}
		.tel{
			position: absolute;
			top:280px;
			left:8%
		}
		.phone{
			top: 310px;
			position: absolute;
			background: none;
			border: none;
			width:90%;
			height: 40px;
			left:7% ;
			padding-left: 10px;
			z-index:9999;
		}
		.phone-div{
			top: 310px;
			position: absolute;
			background: #fff;
			border: 1px solid black;
			border-radius: 7px;
			opacity: 1;
			color: #fff;
			width:90%;
			height: 40px;
			left:5% ;
		}
	</style>
	<body>
		<div>	<p class="mes">意见描述：</p>
		 		<div class="top"/></div>
		 		<textarea cols="30" rows="10" placeholder="建议自由，意见有理。如在使用过程中有任何想法   欢迎在这里告诉我们。(必填)" id="content"></textarea>
				
				<p class="tel">联系方式：</p>
				<input class="phone" type="text" placeholder="请输入联系方式 ,问题解决我们会联系您哟！" id="tel">
				<div class="phone-div"></div>
				<input class="submit" type="button" style="margin-top:15px" value="提交 " onclick="show2()">	
		</div>
	</body>

</html>